package com.redwine.app.net.responses;

import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
 * 货源详情页面
 * 作者：gassion on 17/8/12 20:35
 * 最可怕的敌人，就是没有坚强的信念。
 */
public class AdoptDetailResponse extends BaseResponse {

    /**
     * data : {"publish_info":{"id":"5","category":"白酒","produce":"阿尔巴尼亚","name":"红酒","city":"石家庄市","switch":"1","price":"20.00","num":"2","content":"留言","pic":"","date":"2017-08-08 16:40:32","status":"5","uid":"1","remain":"-9天-8小时-21分","remain_before":"15天7小时21分"},"supplier_info":{"id":"2","uid":"1","business":"物流,仓库","title":"商家名称","name":"姓名","tax_num":"3234243242424232","tax_pic":"https://t-app.bshongjiu.com/image/hongjiu/201708/03/163753680829.png","id_pic":"https://t-app.bshongjiu.com/image/hongjiu/201708/03/163753961173.png","date":"2017-08-03 16:37:53","type":"1","reason":null,"id_num":"220283199012071556","avatar":"https://t-app.bshongjiu.com/image/avatar/201704/06/000537584477.png"},"message":[{"id":"1","uid":"8","business_uid":"1","content":"111","date":"2017-08-10 00:10:00","publish_id":"4","avatar":"https://t-app.bshongjiu.com/image/avatar/201704/07/092726964309.png","nickname":"Wei"},{"id":"2","uid":"8","business_uid":"1","content":"留言","date":"2017-08-10 00:10:13","publish_id":"11","avatar":"https://t-app.bshongjiu.com/image/avatar/201704/07/092726964309.png","nickname":"Wei"},{"id":"3","uid":"8","business_uid":"1","content":"留言","date":"2017-08-10 00:10:14","publish_id":"11","avatar":"https://t-app.bshongjiu.com/image/avatar/201704/07/092726964309.png","nickname":"Wei"},{"id":"4","uid":"8","business_uid":"1","content":"留言","date":"2017-08-10 00:10:15","publish_id":"11","avatar":"https://t-app.bshongjiu.com/image/avatar/201704/07/092726964309.png","nickname":"Wei"}],"is_collectionis":"21"}
     */

    private DataEntity data;

    public DataEntity getData() {
        return data;
    }

    public void setData(DataEntity data) {
        this.data = data;
    }

    public static class DataEntity {
        /**
         * publish_info : {"id":"5","category":"白酒","produce":"阿尔巴尼亚","name":"红酒","city":"石家庄市","switch":"1","price":"20.00","num":"2","content":"留言","pic":"","date":"2017-08-08 16:40:32","status":"5","uid":"1","remain":"-9天-8小时-21分","remain_before":"15天7小时21分"}
         * supplier_info : {"id":"2","uid":"1","business":"物流,仓库","title":"商家名称","name":"姓名","tax_num":"3234243242424232","tax_pic":"https://t-app.bshongjiu.com/image/hongjiu/201708/03/163753680829.png","id_pic":"https://t-app.bshongjiu.com/image/hongjiu/201708/03/163753961173.png","date":"2017-08-03 16:37:53","type":"1","reason":null,"id_num":"220283199012071556","avatar":"https://t-app.bshongjiu.com/image/avatar/201704/06/000537584477.png"}
         * message : [{"id":"1","uid":"8","business_uid":"1","content":"111","date":"2017-08-10 00:10:00","publish_id":"4","avatar":"https://t-app.bshongjiu.com/image/avatar/201704/07/092726964309.png","nickname":"Wei"},{"id":"2","uid":"8","business_uid":"1","content":"留言","date":"2017-08-10 00:10:13","publish_id":"11","avatar":"https://t-app.bshongjiu.com/image/avatar/201704/07/092726964309.png","nickname":"Wei"},{"id":"3","uid":"8","business_uid":"1","content":"留言","date":"2017-08-10 00:10:14","publish_id":"11","avatar":"https://t-app.bshongjiu.com/image/avatar/201704/07/092726964309.png","nickname":"Wei"},{"id":"4","uid":"8","business_uid":"1","content":"留言","date":"2017-08-10 00:10:15","publish_id":"11","avatar":"https://t-app.bshongjiu.com/image/avatar/201704/07/092726964309.png","nickname":"Wei"}]
         * is_collectionis : 21
         */

        private PublishInfoEntity publish_info;
        private SupplierInfoEntity supplier_info;
        private String is_collectionis;
        private List<MessageEntity> message;

        public PublishInfoEntity getPublish_info() {
            return publish_info;
        }

        public boolean isCollection() {
            return !"0".equals(is_collectionis) ? true : false;
        }

        public void setPublish_info(PublishInfoEntity publish_info) {
            this.publish_info = publish_info;
        }

        public SupplierInfoEntity getSupplier_info() {
            return supplier_info;
        }

        public void setSupplier_info(SupplierInfoEntity supplier_info) {
            this.supplier_info = supplier_info;
        }

        public String getIs_collectionis() {
            return is_collectionis;
        }

        public void setIs_collectionis(String is_collectionis) {
            this.is_collectionis = is_collectionis;
        }

        public List<MessageEntity> getMessage() {
            return message;
        }

        public void setMessage(List<MessageEntity> message) {
            this.message = message;
        }

        public static class PublishInfoEntity {
            /**
             * id : 5
             * category : 白酒
             * produce : 阿尔巴尼亚
             * name : 红酒
             * city : 石家庄市
             * switch : 1
             * price : 20.00
             * num : 2
             * content : 留言
             * pic :
             * date : 2017-08-08 16:40:32
             * status : 5
             * uid : 1
             * remain : -9天-8小时-21分
             * remain_before : 15天7小时21分
             */

            private String id;
            private String category;
            private String produce;
            private String shareUrl;
            private String name;
            private String city;
            @SerializedName("switch")
            private String switchX;
            private String price;
            private String num;
            private String content;
            private String pic;
            private String date;
            @SerializedName("status")
            private String statusX;
            private String uid;
            private String remain;
            private String remain_before;

            public String getShareUrl() {
                return shareUrl;
            }

            public void setShareUrl(String shareUrl) {
                this.shareUrl = shareUrl;
            }

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getCategory() {
                return category;
            }

            public void setCategory(String category) {
                this.category = category;
            }

            public String getProduce() {
                return produce;
            }

            public void setProduce(String produce) {
                this.produce = produce;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getCity() {
                return city;
            }

            public void setCity(String city) {
                this.city = city;
            }

            public String getSwitchX() {
                return switchX;
            }

            public void setSwitchX(String switchX) {
                this.switchX = switchX;
            }

            public String getPrice() {
                return price;
            }

            public void setPrice(String price) {
                this.price = price;
            }

            public String getNum() {
                return num;
            }

            public void setNum(String num) {
                this.num = num;
            }

            public String getContent() {
                return content;
            }

            public void setContent(String content) {
                this.content = content;
            }

            public String getPic() {
                return pic;
            }

            public void setPic(String pic) {
                this.pic = pic;
            }

            public String getDate() {
                return date;
            }

            public void setDate(String date) {
                this.date = date;
            }

            public String getStatusX() {
                return statusX;
            }

            public void setStatusX(String statusX) {
                this.statusX = statusX;
            }

            public String getUid() {
                return uid;
            }

            public void setUid(String uid) {
                this.uid = uid;
            }

            public String getRemain() {
                return remain;
            }

            public void setRemain(String remain) {
                this.remain = remain;
            }

            public String getRemain_before() {
                return remain_before;
            }

            public void setRemain_before(String remain_before) {
                this.remain_before = remain_before;
            }
        }

        public static class SupplierInfoEntity {
            /**
             * id : 2
             * uid : 1
             * business : 物流,仓库
             * title : 商家名称
             * name : 姓名
             * tax_num : 3234243242424232
             * tax_pic : https://t-app.bshongjiu.com/image/hongjiu/201708/03/163753680829.png
             * id_pic : https://t-app.bshongjiu.com/image/hongjiu/201708/03/163753961173.png
             * date : 2017-08-03 16:37:53
             * type : 1
             * reason : null
             * id_num : 220283199012071556
             * avatar : https://t-app.bshongjiu.com/image/avatar/201704/06/000537584477.png
             */

            private String id;
            private String uid;
            private String business;
            private String title;
            private String name;
            private String tax_num;
            private String tax_pic;
            private String id_pic;
            private String date;
            private String type;
            private Object reason;
            private String id_num;
            private String avatar;
            private String sex;
            private String mobile;

            public String getMobile() {
                return mobile;
            }

            public void setMobile(String mobile) {
                this.mobile = mobile;
            }

            public boolean getSex() {
                //性别1男2女
                if ("1".equals(sex)) {
                    return true;
                } else {
                    return false;
                }
            }

            public void setSex(String sex) {
                this.sex = sex;
            }

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getUid() {
                return uid;
            }

            public void setUid(String uid) {
                this.uid = uid;
            }

            public String getBusiness() {
                return business;
            }

            public void setBusiness(String business) {
                this.business = business;
            }

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getTax_num() {
                return tax_num;
            }

            public void setTax_num(String tax_num) {
                this.tax_num = tax_num;
            }

            public String getTax_pic() {
                return tax_pic;
            }

            public void setTax_pic(String tax_pic) {
                this.tax_pic = tax_pic;
            }

            public String getId_pic() {
                return id_pic;
            }

            public void setId_pic(String id_pic) {
                this.id_pic = id_pic;
            }

            public String getDate() {
                return date;
            }

            public void setDate(String date) {
                this.date = date;
            }

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }

            public Object getReason() {
                return reason;
            }

            public void setReason(Object reason) {
                this.reason = reason;
            }

            public String getId_num() {
                return id_num;
            }

            public void setId_num(String id_num) {
                this.id_num = id_num;
            }

            public String getAvatar() {
                return avatar;
            }

            public void setAvatar(String avatar) {
                this.avatar = avatar;
            }
        }

        public static class MessageEntity {
            /**
             * id : 1
             * uid : 8
             * business_uid : 1
             * content : 111
             * date : 2017-08-10 00:10:00
             * publish_id : 4
             * avatar : https://t-app.bshongjiu.com/image/avatar/201704/07/092726964309.png
             * nickname : Wei
             */

            private String id;
            private String uid;
            private String business_uid;
            private String content;
            private String date;
            private String publish_id;
            private String avatar;
            private String nickname;

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getUid() {
                return uid;
            }

            public void setUid(String uid) {
                this.uid = uid;
            }

            public String getBusiness_uid() {
                return business_uid;
            }

            public void setBusiness_uid(String business_uid) {
                this.business_uid = business_uid;
            }

            public String getContent() {
                return content;
            }

            public void setContent(String content) {
                this.content = content;
            }

            public String getDate() {
                return date;
            }

            public void setDate(String date) {
                this.date = date;
            }

            public String getPublish_id() {
                return publish_id;
            }

            public void setPublish_id(String publish_id) {
                this.publish_id = publish_id;
            }

            public String getAvatar() {
                return avatar;
            }

            public void setAvatar(String avatar) {
                this.avatar = avatar;
            }

            public String getNickname() {
                return nickname;
            }

            public void setNickname(String nickname) {
                this.nickname = nickname;
            }
        }
    }
}
